package fr.vvins.core.page.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import fr.vvins.core.page.entity.Page;
@Repository
public interface PageRepository extends CrudRepository<Page, Integer> {

	@Query("from Page where name=?1 and content.key=?2")
	List<Page> findByNameAndContentKey(String name, String contentKey);

	@Query("from Page where name=?1 and content is null")
	List<Page> findDefaultByName(String name);

}
